On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _
    ("Select * From Win32_NetworkAdapterConfiguration Where SettingID = '%1'")
For Each objNetCard in colNetCards
    arrDNSServers = Array("%2", "%3")
    objNetCard.SetDNSServerSearchOrder(arrDNSServers)
Next

